<strong>#Ищет базу на любых уровнях.</strong> #Cнять галочку Include Extended Session #Thinkorswim https://RadchenkoVY.com/TOS def iDiff = 0.00; #максимальное отклонение в центах def iBars = 4; #число баров для просмотра def iLowest = lowest(low,iBars); def iHighest = highest(high,iBars); def bBaseLow = fold Lbar = 0 to iBars with Ls=1 do if ((low[Lbar]-iLowest)<=iDiff) then Ls*1 else Ls*0; def bBaseHigh = fold Hbar = 0 to iBars with Hs=1 do if ((iHighest-high[Hbar])<=iDiff) then Hs*1 else Hs*0; plot bBase = if bBaseLow then 1 else if bBaseHigh then 2 else 100; AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); bBase.AssignValueColor (if bBase <> 100 then Color.black else Color.CURRENT);
<strong>#Ищет базу на уровнях кратным 50 центам.</strong> #Cнять галочку Include Extended Session #Thinkorswim https://RadchenkoVY.com/TOS def iDiff = 0.00; #максимальное отклонение в центах def iBars = 4; #число баров для просмотра def iLowest = lowest(low,iBars); def iHighest = highest(high,iBars); def bBaseLow = fold Lbar = 0 to iBars with Lsumm=1 do if ((low[Lbar]-iLowest)<=iDiff) then Lsumm*1 else Lsumm*0; def bBaseHigh = fold Hbar = 0 to iBars with Hsumm=1 do if ((iHighest-high[Hbar])<=iDiff) then Hsumm*1 else Hsumm*0; def iFigureLow = fold FLbar = 1 to iBars+1 with FLsumm do if (low[FLbar] == (Floor(low[FLbar]*2))/2) then FLsumm+1 else FLsumm; def iFigureHigh = fold FHbar = 1 to iBars+1 with FHsumm do if (high[FHbar] == (Ceil(high[FHbar]*2))/2) then FHsumm+1 else FHsumm; plot bBase = if (bBaseLow and iFigureLow) then 1 else if (bBaseHigh and iFigureHigh) then 2 else 100; AssignBackgroundColor (if (bBase == 1) then Color.LIGHT_GREEN else if (bBase == 2) then Color.LIGHT_RED else Color.black); bBase.AssignValueColor (if bBase <> 100 then Color.black else Color.CURRENT);
#Thinkorswim studies #Рисует показатели акции прямо на графике. #Позволяет быстро увидеть ATR акции, средний объем и т.д. #Thinkorswim https://RadchenkoVY.com/TOS def length = 14; # сколько дней учитывать при расчетах показателей input AvgVolume = {default "1", "0"}; input ATR = {default "1", "0"}; input VolumePlay = {default "1", "0"}; input ATRPlay = {default "1", "0"}; input Volume_ = {default "1", "0"}; input IQTicker = {default "1", "0"}; #IQ AddLabel (yes,"RadchenkoVY.COM", Color.LIGHT_GREEN); def iATR = Round((Average(high(period = "DAY"), length ) - Average(low(period = "DAY"), length )), 2); AddLabel (!ATR, "ATR " + iATR, Color.WHITE); def iATRPlay = Round((high(period = "DAY") - low(period = "DAY")) / iATR, 1); AddLabel (!ATRPlay, "ATRPlay " + iATRPlay, Color.LIGHT_GREEN); def iAvgVolume = Round(Average (volume(period = "DAY")[1], length), 1); AddLabel (!AvgVolume, "AvgVol " + iAvgVolume, Color.WHITE); def iVolume = volume(period = "DAY"); AddLabel (!Volume_, "Vol " + iVolume, Color.LIGHT_GREEN); def iVolumePlay = Round(iVolume / Average(volume(period = "DAY"), length), 1); AddLabel (!VolumePlay, "VolPlay " + iVolumePlay, Color.LIGHT_GREEN); def IQ = round ((iAvgVolume/390*iATR/1000),0); AddLabel (!IQTicker, "IQ " + IQ, Color.WHITE);
Полная библиотека индикаторов, фильтрови и сканеров для Thinkorswim в этом блоге bit.ly/2vKq4F8